extends layout

block content
  h1=title
  - userVar = user
  - if(userVar)
    form(method='post',action='/update')
      fieldset
        legend=title
        div.clearfix
          label 编号
          div.input
            input(name='user[id]',readonly='readonly',class='xlarge',value=user.id)
          label 姓名
          div.input
            input(name='user[name]',class='xlarge',value=user.lastName + user.firstName)
          label 地址
          div.input
            input(name='user[address]',class='xlarge',value=user.address)
        div.actions
          input(type='submit',value='儲存',class='btn primary')
          button(type='reset',class='btn') 清除
  - else
    form(method='post',action='/create')
      fieldset
        legend=title
        div.clearfix
          label 姓名
          div.input
            input(name='user[name]',class='xlarge')
          label 地址
          div.input
            input(name='user[address]',class='xlarge')
        div.actions
          input(type='submit',value='新增',class='btn primary')
          button(type='reset',class='btn') 清除
